package com.suse.lhw.security.service.Impl;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import com.suse.lhw.dao.PHealthDataMapper;
import com.suse.lhw.domin.PHealthData;
import com.suse.lhw.security.service.PHealthDataService;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ProjectName: health_manage_system
 * @Package: com.suse.lhw.security.service.Impl
 * @ClassName: PHealthDataServiceImpl
 * @Description: java类作用描述
 * @Author: 李鸿炜
 * @CreateDate: 2020/5/21 14:08
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/5/21 14:08
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@Service
@Transactional

public class PHealthDataServiceImpl implements PHealthDataService {

    @Resource
    private PHealthDataMapper pHealthDataMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return pHealthDataMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(PHealthData record) {
        return pHealthDataMapper.insert(record);
    }

    @Override
    public int insertSelective(PHealthData record) {
        return pHealthDataMapper.insertSelective(record);
    }

    @Override
    public PHealthData selectByPrimaryKey(Integer id) {
        return pHealthDataMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(PHealthData record) {
        return pHealthDataMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(PHealthData record) {
        return pHealthDataMapper.updateByPrimaryKey(record);
    }

    @Override
    public PHealthData selectByUserid(String userId) {
        System.out.println("the result is" + pHealthDataMapper.selectByUserid(userId));
        return pHealthDataMapper.selectByUserid(userId);
    }

}
